package com.sample.model;

import java.io.Serializable;
import java.net.URI;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.rssowl.core.internal.persist.AbstractEntity;
import org.rssowl.core.internal.persist.MergeResult;
import org.rssowl.core.internal.persist.News;
import org.rssowl.core.persist.IAttachment;
import org.rssowl.core.persist.ICategory;
import org.rssowl.core.persist.IFeed;
import org.rssowl.core.persist.IGuid;
import org.rssowl.core.persist.ILabel;
import org.rssowl.core.persist.INews;
import org.rssowl.core.persist.IPerson;
import org.rssowl.core.persist.ISource;
import org.rssowl.core.persist.reference.FeedLinkReference;
import org.rssowl.core.persist.reference.NewsReference;

public class News1 extends News implements INews {
	
	public News1()
	{ }
	
	static final class Lock {

	    private final transient ReentrantReadWriteLock fLock = new ReentrantReadWriteLock();
	    private volatile transient Thread fReadLockThread;

	    void acquireWriteLock() {
	      if (fReadLockThread == Thread.currentThread()) {
	        throw new IllegalStateException("Cannot acquire the write lock from the " +
	        		"same thread as the read lock.");
	      }
	      fLock.writeLock().lock();
	    }

	    void releaseWriteLock() {
	      fLock.writeLock().unlock();
	    }

	    void acquireReadLock() {
	      fLock.readLock().lock();
	    }

	    void acquireReadLockSpecial() {
	      fLock.readLock().lock();
	      fReadLockThread = Thread.currentThread();
	    }

	    void releaseReadLock() {
	      fLock.readLock().unlock();
	    }

	    void releaseReadLockSpecial() {
	      fReadLockThread = null;
	      fLock.readLock().unlock();
	    }

	  }
	private String fTitle;
	 private String fLinkText;

	  private String fBaseUri;

	  private Date fReceiveDate;
	  private Date fPublishDate;
	  private Date fModifiedDate;

	  private String fComments;
	  private String fInReplyTo;
	  private boolean fIsFlagged;
	  private int fRating;

	  private int fStateOrdinal = INews.State.NEW.ordinal();

	  private String fGuidValue;
	  private transient IGuid fGuid;
	  private boolean fGuidIsPermaLink;

	  private ISource fSource;

	  private String fFeedLink;

	  private IPerson fAuthor;

	  private List<IAttachment> fAttachments;
	  private List<ICategory> fCategories;
	  private Set<ILabel> fLabels;

	  /* This field is only non-zero if the parent is not a feed */
	  private long fParentId;

	  //TODO Remove this after M8 release
	  @SuppressWarnings("unused")
	  private String fDescription;

	  /* We can't use fDescription to support migration from M7 to M8 */
	  private transient String fTransientDescription;
	  private transient boolean fTransientDescriptionSet;

	  private transient final Lock fLock = new Lock();

	
	
	
	
	public String getTitle() {  return fTitle;  }
	public void addAttachment(IAttachment attachment) {
		// TODO Auto-generated method stub
		
	}
	public void addCategory(ICategory category) {
		// TODO Auto-generated method stub
		
	}
	public boolean addLabel(ILabel label) {
		// TODO Auto-generated method stub
		return false;
	}
	public List<IAttachment> getAttachments() {
		// TODO Auto-generated method stub
		return null;
	}
	public IPerson getAuthor() {
		// TODO Auto-generated method stub
		return null;
	}
	public URI getBase() {
		// TODO Auto-generated method stub
		return null;
	}
	public List<ICategory> getCategories() {
		// TODO Auto-generated method stub
		return null;
	}
	public String getComments() {
		// TODO Auto-generated method stub
		return null;
	}
	public String getDescription() {
		// TODO Auto-generated method stub
		return null;
	}
	public String getFeedLinkAsText() {
		// TODO Auto-generated method stub
		return null;
	}
	public FeedLinkReference getFeedReference() {
		// TODO Auto-generated method stub
		return null;
	}
	public IGuid getGuid() {
		// TODO Auto-generated method stub
		return null;
	}
	public String getInReplyTo() {
		// TODO Auto-generated method stub
		return null;
	}
	public Set<ILabel> getLabels() {
		// TODO Auto-generated method stub
		return null;
	}
	public URI getLink() {
		// TODO Auto-generated method stub
		return null;
	}
	public String getLinkAsText() {
		// TODO Auto-generated method stub
		return null;
	}
	public Date getModifiedDate() {
		// TODO Auto-generated method stub
		return null;
	}
	public long getParentId() {
		// TODO Auto-generated method stub
		return 0;
	}
	public Date getPublishDate() {
		// TODO Auto-generated method stub
		return null;
	}
	public int getRating() {
		// TODO Auto-generated method stub
		return 0;
	}
	public Date getReceiveDate() {
		// TODO Auto-generated method stub
		return null;
	}
	public ISource getSource() {
		// TODO Auto-generated method stub
		return null;
	}
	public State getState() {
		// TODO Auto-generated method stub
		return null;
	}
	public boolean isEquivalent(INews other) {
		// TODO Auto-generated method stub
		return false;
	}
	public boolean isFlagged() {
		// TODO Auto-generated method stub
		return false;
	}
	public boolean isVisible() {
		// TODO Auto-generated method stub
		return false;
	}
	public void removeAttachment(IAttachment attachment) {
		// TODO Auto-generated method stub
		
	}
	public boolean removeLabel(ILabel label) {
		// TODO Auto-generated method stub
		return false;
	}
	public void setAuthor(IPerson author) {
		// TODO Auto-generated method stub
		
	}
	public void setBase(URI baseUri) {
		// TODO Auto-generated method stub
		
	}
	public void setComments(String comments) {
		// TODO Auto-generated method stub
		
	}
	public void setDescription(String description) {
		// TODO Auto-generated method stub
		
	}
	public void setFlagged(boolean isFlagged) {
		// TODO Auto-generated method stub
		
	}
	public void setGuid(IGuid guid) {
		// TODO Auto-generated method stub
		
	}
	public void setInReplyTo(String guid) {
		// TODO Auto-generated method stub
		
	}
	public void setLink(URI link) {
		// TODO Auto-generated method stub
		
	}
	public void setModifiedDate(Date modifiedDate) {
		// TODO Auto-generated method stub
		
	}
	public void setPublishDate(Date pubDate) {
		// TODO Auto-generated method stub
		
	}
	public void setRating(int rating) {
		// TODO Auto-generated method stub
		
	}
	public void setReceiveDate(Date receiveDate) {
		// TODO Auto-generated method stub
		
	}
	public void setSource(ISource source) {
		// TODO Auto-generated method stub
		
	}
	public void setState(State state) {
		// TODO Auto-generated method stub
		
	}
	public void setTitle(String title) {
		// TODO Auto-generated method stub
		
	}
	public NewsReference toReference() {
		// TODO Auto-generated method stub
		return null;
	}
	
	public Map<String, Serializable> getProperties() {
		// TODO Auto-generated method stub
		return null;
	}
	public Object getProperty(String key) {
		// TODO Auto-generated method stub
		return null;
	}
	public Object removeProperty(String key) {
		// TODO Auto-generated method stub
		return null;
	}
	public void setId(Long id) {
		// TODO Auto-generated method stub
		
	}
	public void setProperty(String key, Serializable value) {
		// TODO Auto-generated method stub
		
	}
	public Object getAdapter(Class adapter) {
		// TODO Auto-generated method stub
		return null;
	}
	public MergeResult merge(INews objectToMerge) {
		// TODO Auto-generated method stub
		return null;
	}
	public void setParent(IFeed newParent) {
		// TODO Auto-generated method stub
		
	}
}
